//
//  Extension+UIImageView.swift
//  STVVeibo
//
//  Created by leergou on 16/7/20.
//  Copyright © 2016年 WhiteHouse. All rights reserved.
//

import UIKit
import SDWebImage

// 便利构造函数
extension UIImageView{
    
    convenience init(imgName: String){
        
        self.init(image: UIImage(named: imgName))
    }
    
    // 对 SDWebImageView 封装
    func st_setImage(urlString: String?, placeholderImgName: String){
        sd_setImageWithURL(NSURL(string: urlString ?? ""), placeholderImage:UIImage(named: "avatar_default_big"))
        
    }
}

